/*
 * Copyright (c) 2003
 * XDoclet Team
 * All rights reserved.
 */
package org.xdoclet.plugin.qtags;

import org.generama.QDoxCapableMetadataProvider;
import org.generama.TemplateEngine;
import org.generama.WriterMapper;

import org.generama.defaults.QDoxPlugin;

/**
 * abstract base clas for qtags plugins encapsulating common features
 * @author kostik
 */
public abstract class AbstractQTagsPlugin extends QDoxPlugin {
    protected QTagUtils qTagUtils = new QTagUtils();
    private String namespace;

    /**
     * @param templateEngine
     * @param metadataProvider
     * @param writerMapper
     */
    public AbstractQTagsPlugin(TemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider,
        WriterMapper writerMapper) {
        super(templateEngine, metadataProvider, writerMapper);
        qTagUtils.registerLibrary(metadataProvider);
    }

    public void setNamespace(String namespace) {
        this.namespace = namespace;
    }

    /**
     * plugin namespace will be used in documenation
     * @return
     */
    public String getNamespace() {
        return namespace;
    }

    /**
     * @return Returns the qTagUtils.
     */
    public QTagUtils getQTagUtils() {
        return qTagUtils;
    }
}